package opp;

public class arrayAssign {
    public static void main(String[] args) {
        //值传递与引用传递的区别
        //值传递
        int a=10;
        int b=a;
        b=30;
        System.out.println("a="+a+"a");
        System.out.println("b="+b+"b");
        //引用传递
        int[] arr1={1,2,3};
        int[] arr2=arr1;
        arr2[1]=10;
        System.out.println("==数组arr1==");
        for(int i=0;i<arr1.length;i++)
        {
            System.out.print(+arr1[i]+ " ");
        }
        //arr2
        System.out.println("\n==数组arr2==");
        for(int i=0;i<arr2.length;i++)
        {
            System.out.print(+arr2[i]+ " ");
        }
    }
}
